// 使用react-app-rewired和customize-cra结合这个文件修改webpack的配置

const {
  override,
  addLessLoader,
  fixBabelImports,
  addDecoratorsLegacy,
  addPostcssPlugins,
} = require('customize-cra');

module.exports = override(
  fixBabelImports('import', {
    libraryName: 'antd',
    libraryDirectory: 'es',
    style: 'css',
  }),
  addLessLoader({
    strictMath: true,
    noIeCompat: true,
    localIdentName: '[local]--[hash:base64:5]'
  }),
  addDecoratorsLegacy(),
  addPostcssPlugins([require("postcss-px2rem")({ remUnit: 17.7 })])
);


